<template>
  <router-view />
</template>
<script>
const debounce = (fn, delay) => {
  let timer = null;
  return function () {
    let context = this;
    let args = arguments;
    clearTimeout(timer);
    timer = setTimeout(function () {
      fn.apply(context, args);
    }, delay);
  };
};

const _ResizeObserver = window.ResizeObserver;
window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
  constructor(callback) {
    callback = debounce(callback, 16);
    super(callback);
  }
};
</script>
<style lang="scss">
html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
  border-radius: 3px;
}

/*定义滚动条轨道 内阴影+圆角*/

::-webkit-scrollbar-track {
  //-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.05);
}

/*定义滑块 内阴影+圆角*/

::-webkit-scrollbar-thumb {
  border-radius: 3px;
  //-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
  background: rgba(0, 0, 0, 0.15);
}
:hover::-webkit-scrollbar {
  width: 4px;
  height: 4px;
  background: rgb(235, 228, 228);
}
</style>
